package cn.kai.auth.mapper;

import cn.kai.auth.domain.Logininfo;
import cn.kai.basic.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author kai
 * @since 2022-06-16
 */
public interface LogininfoMapper extends BaseMapper<Logininfo> {

    /**
     * 基于用户名查找
     * @param username
     * @param type
     * @return
     */
    Logininfo loadByUsernameAndType(@Param("username") String username, @Param("type") Integer type);

    /**
     * 基于userid查询
     * @param userId
     * @return
     */
    Logininfo loadByUserId(Long userId);
}
